package com.ruoyi.bom.domain;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.bom.dto.StapAndPriceAndUnitTransfer;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.*;

/**
 * 菜品BOM关系表
 * @TableName tql_dish_bom
 */
@Setter
@Getter
public class TqlDishBom {

    @ApiModelProperty(name = "菜品id")
    @TableId
    private Long id;

    @ApiModelProperty(name = "类型 0：成品，1：半成品")
    private Integer type;

    @ApiModelProperty(name = "菜品id")
    private String foodId;

    @ApiModelProperty(name = "菜名名称")
    private String foodName;

    @ApiModelProperty(name = "菜品编码")
    private String foodCode;

    @ApiModelProperty(name = "价格")
    private BigDecimal price;

    @ApiModelProperty(name = "成本")
    private BigDecimal cost;

    @ApiModelProperty(name = "毛利")
    private BigDecimal grossProfit;

    @ApiModelProperty(name = "审核状态 审核状态 0：待审核，1：审核通过，9：拒绝")
    private Integer verifierStatus;

    @ApiModelProperty(name = "审核时间")
    private Date verifierTime;

    @ApiModelProperty(name = "审核拒绝理由")
    private String verifierRefuseReason;

    @ApiModelProperty(name = "审核人")
    private String verifier;

    @ApiModelProperty(name = "部门CODE")
    private Long shopId;

    @ApiModelProperty(name = "部门CODE")
    private String deptCode;
    /**
     * 毛利率
     */
    private String grossProfitRate;

    /**
     * BOM版本
     */
    private String bomVersion;

    /**
     * BOM生效时间
     */
    private Date bomEffectiveTime;

    /**
     * BOM失效时间
     */
    private Date bomFailureTime;



    /**
     * 是否锁定  1表示锁定  0表示未锁定
     */
    private Integer isLock;

    /**
     * 是否启用  1表示启用 0表示为未启用
     */
    private Integer isEnable;

    /**
     * 乐观锁
     */
    private String revision;

    /**
     * 创建人
     */
    private String createdBy;


    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;



    /**
     * 更新人
     */
    private String updatedBy;


    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedTime;

    /**
     * 备注
     */
    private String remark;

    /**
     * 部门Id
     */
    private Integer deptId;

    /**
     * 部门名称
     */
    private String deptName;

    private Long unitId;

    private BigDecimal productCoefficient;

//    @TableField(exist = false)
    private String unit;

    @TableField(exist = false)
    private Integer[] ids;

    @TableField(exist = false)
    private List<TqlBom> bomList;
    @TableField(exist = false)
    private List<StapAndPriceAndUnitTransfer> sput;

}